package com.vicent.controller;


import com.vicent.entity.OrderInfo;
import com.vicent.service.OrderInfoService;
import com.vicent.vo.R;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author vincent
 * @since 2023-09-01
 */
@Slf4j
@RestController
@RequestMapping("/api/order-info")
public class OrderInfoController {

    @Autowired
    private OrderInfoService orderInfoService;

    @CrossOrigin
    @ApiOperation("订单列表")
    @GetMapping("/list")
    public R list(){
        log.info("订单列表");
        List<OrderInfo> list = orderInfoService.list();
        return R.ok().data("list",list);
    }


}

